<fieldset><legend>Notifications</legend>
<?php if(count($messages)==0 and count($dossiers)==0):?>
	<h3>Vous n'avez pas de nouveaux messages</h3>
<?php else:?>
	<?php if(count($messages)>0):?>
		<h3>Vous avez des messages de:</h3>
		<?php $serviceAnt = '';?>
		<?php foreach ($messages as $message):?>
		<div>
		<?php if($serviceAnt != $message['message']['service']['description']):?>
		<h4 style="clear:both;"><?php echo (isset($message['message']['service']['description']))?$message['message']['service']['description']:'Sans service especifié';?></h4>
		<?php endif;?>
			<a style="float: left;" id="message<?php echo $message['id']?>" class="fancyMessage" href="<?php echo url_for('ajax/getNotificationContent?id=' . $message['id']) ?>" >
				<img title="<?php echo (isset($message['message']['service']['description']))?$message['message']['titre']:'Sans service especifié';?>" src="/images/icons/48/message.png">
			</a>
		</div>
		
		<?php $serviceAnt = $message['message']['service']['description']?>
		<?php endforeach;?>
	<?php endif;?>	
	<div style="clear:both;"></div>
	<?php if(count($dossiers)>0):?>
		<h3>Dossiers:</h3>
		<?php foreach ($dossiers as $notifDossier):?>
			<a style="float: left;" id="notif_dossier<?php echo $notifDossier['id']?>" class="fancyMessage" href="<?php echo url_for('ajax/getNotificationContent?id=' . $notifDossier['id']) ?>" >
				<img title="<?php echo $notifDossier['dossier']['numero']?>" src="/images/icons/48/dossier.png">
			</a>
		<?php endforeach;?>
	<?php endif;?>
<?php endif;?>

</fieldset>